<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>分店采购详情</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <script src="https://cdn.bootcss.com/limonte-sweetalert2/7.28.11/sweetalert2.all.js"></script>
  <link href="https://cdn.bootcss.com/limonte-sweetalert2/7.28.11/sweetalert2.css" rel="stylesheet">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.js"></script>
  <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
  <link rel="stylesheet" href="../../res/css/wholesale/font.css">
  <link rel="stylesheet" href="../../res/css/wholesale/xadmin.css">
  <link rel="stylesheet" href="../../res/layui/css/layui.css">
  <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  <script type="text/javascript" src="../../res/layui/layui.js" charset="utf-8"></script>
</head>
<body>
 <input type="text" id="returnTotales" style="height:50px;width: 900px;">
<div class="demoTable" style="margin-top: 10px;">
    <div class="x-body">
    	<div class="layui-row">
        <div class="layui-form layui-col-md12 x-so">
          <input type="text" name="id" id="demoReload" placeholder="请输入药品名称" autocomplete="off" class="layui-input">
         	 
          <button class="layui-btn" data-type="reload" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </div>
         <div class="layui-form layui-col-md12 x-so">
          <button class="layui-btn layui-btn layui-btn-danger" id = "yesReturn" value = "确定退货" data-type="reload" lay-filter="sreach"><i class="layui-icon">确定退货</i></button>
        </div>
        
     </div>
<table class="layui-table" lay-data="{ url:'../../listenSellDetail/selectAll.action', page:true, id:'idTest'}" lay-filter="demo" id="test">
  <thead>
    <tr>
      <th lay-data="{type: 'checkbox', fixed: 'left'}"></th>
      <th lay-data="{field:'muName', align:'center'}">乐器名称</th>
      <th lay-data="{field:'mtName',align:'center'}">乐器类型</th>
      <th lay-data="{field:'stockNumber',  align:'center'}">库存数量</th>
      <th lay-data="{field:'qtNoNumber',  align:'center'}">未通过质检数量</th>
      <th lay-data="{field:'muNumber', align:'center'}">采购数量</th>
      <th lay-data="{field:'muPrice',  align:'center'}">采购明细金额</th>
      <th lay-data="{field:'subtotal',  align:'center'}">小计</th>
      <th lay-data="{field:'returnNumber', align:'center',templet:'#number'}">退货数量</th>
      <th lay-data="{field:'returnTotal',  align:'center',templet:'#Total'}">退货小计</th>
      <!-- <th lay-data="{field: 'right', width:150, align:'center', toolbar: '#barDemo'}">操作</th> -->
    </tr>
  </thead>
</table>
 </div>
 </div>
 
 <!-- <div class="layui-btn-group demoTable">
  <button class="layui-btn" data-type="getCheckData">获取选中行数据</button>
</div> -->

<script type="text/html" id = "number">
		<input class = 'layui-input' name = "returnNumber" max='{{ d.muNumber}}' oninput="if(value>{{ d.muNumber-d.qtNoNumber}})value={{ d.muNumber-d.qtNoNumber}};if(value<{{d.qtNoNumber}})value={{d.qtNoNumber}}" min = '{{d.qtNoNumber}}' style = 'text-align:center' type = 'input' value = '{{ d.muNumber-d.qtNoNumber}}' onkeyup='findKeyup("{{ d.sdId}}");' id = 'returnNumber{{ d.sdId}}'/>
</script>

<script type="text/html" id = "Total">
		<input class = 'layui-input' style = 'text-align:center;' onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))" name = "returnTotal" type = 'text' style = 'border:none;'  unselectable="on" value = "{{ d.subtotal}}" id = 'returnTotal{{ d.sdId}}' />
</script>
<script src="https://lib.baomitu.com/jquery/1.12.4/jquery.min.js"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script type="text/javascript" src="../../res/js/return/returnDetail.js"></script>
</body>

</html>